﻿using PersonaLibrary.Data;
using PersonaLibrary.ViewModel.EmployeeViewModel;
using PersonaLibrary.ViewModel.OrganizationsViewModel;

namespace PersonaLibrary.Commands.SearchCommands
{
	internal static class Commands
	{
		private static NavigateToCommand<Employee> _employeeCommand;
		private static NavigateToCommand<Organization> _organizationCommand;
		private static NavigateToCommand<Job> _jobsCommand;
		private static NavigateToCommand<Note> _notesCommand;

		private static ShowViewModelCommand<EmployeeSearchVM> _employeeSearch;
		private static ShowViewModelCommand<OrganizationSearchVM> _organizationSearch;

		private static ShowEmptyJobs _showEmptyJobs;
		private static ShowEmptyDepartments _showEmptyDepartments;

		public static NavigateToCommand<Employee> EmployeeCommand
		{
			get
			{
				if(_employeeCommand == null)
					_employeeCommand = new NavigateToCommand<Employee>();
				return _employeeCommand;
			}
		}

		public static NavigateToCommand<Organization> OrganizationCommand
		{
			get
			{
				if (_organizationCommand == null)
					_organizationCommand = new NavigateToCommand<Organization>();
				return _organizationCommand;
			}
		}

		public static NavigateToCommand<Job> JobsCommand
		{
			get
			{
				if (_jobsCommand == null)
					_jobsCommand = new NavigateToCommand<Job>();
				return _jobsCommand;
			}
		}

		public static NavigateToCommand<Note> NotesCommand
		{
			get
			{
				if (_notesCommand == null)
					_notesCommand = new NavigateToCommand<Note>();
				return _notesCommand;
			}
		}

		public static ShowViewModelCommand<EmployeeSearchVM> EmployeeSearchCommand
		{
			get
			{
				if(_employeeSearch == null)
					_employeeSearch = new ShowViewModelCommand<EmployeeSearchVM>();
				return _employeeSearch;
			}
		}

		public static ShowViewModelCommand<OrganizationSearchVM> OrganizationSearchCommand
		{
			get
			{
				if(_organizationSearch == null)
					_organizationSearch = new ShowViewModelCommand<OrganizationSearchVM>();
				return _organizationSearch;
			}
		}

		public static ShowEmptyJobs ShowEmptyJobs
		{
			get
			{
				if(_showEmptyJobs == null)
					_showEmptyJobs = new ShowEmptyJobs();
				return _showEmptyJobs;
			}
		}

		public static ShowEmptyDepartments ShowEmptyDepartments
		{
			get
			{
				if(_showEmptyDepartments == null)
					_showEmptyDepartments = new ShowEmptyDepartments();
				return _showEmptyDepartments;
			}
		}
	}
}
